package day03;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Demo06 {

	public static void main(String[] args) throws Exception {
		
		SimpleDateFormat sdf=
				new SimpleDateFormat("yyyy-MM-dd");
		Date date=new Date();
//		System.out.println(date);
//		System.out.println(sdf.format(date));
		
		date.setTime(1000L*60*60*24*365*3+1000L*60*60*24*365*3);
		System.out.println(date);
		System.out.println(sdf.format(date));
	
		String str="1991-3-11";
			Date date1=sdf.parse(str);
			System.out.println(date1);
			long ll=date1.getTime();
			System.out.println(ll);
	
		SimpleDateFormat sdf1 = 
				new SimpleDateFormat("yyyy-MM-dd");	
	
	
	}

}
